package com.mt.roll.core.dal.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 货架表
 * </p>
 *
 * @author mt
 * @since 2022-01-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_shelf")
public class Shelf extends Model<Shelf> {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 删除标志，是否有效:1 可用 0不可用
     */
    @TableField("valid")
    @TableLogic
    private Integer valid;

    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    @TableField("creator_id")
    private Long creatorId;

    /**
     * 更新人id
     */
    @TableField("updater_id")
    private Long updaterId;

    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号 默认为 1
     */
    @TableField("version")
    @Version
    private String version;

    /**
     * 状态		0初始化
     */
    @TableField("status")
    private Integer status;

    /**
     * 内部编码，系统自动生成
     */
    @TableField("inter_code")
    private String interCode;

    /**
     * 编码
     */
    @TableField("code")
    private String code;

    /**
     * 绑定工厂id
     */
    @TableField("factory_id")
    private Long factoryId;

    /**
     * 绑定区域id，关联表：t_area
     */
    @TableField("area_id")
    private Long areaId;

    /**
     * 货架名称
     */
    @TableField("shelf_name")
    private String shelfName;

    /**
     * 行数
     */
    @TableField("row_num")
    private Integer rowNum;

    /**
     * 列数
     */
    @TableField("column_num")
    private Integer columnNum;

    /**
     * 描述信息
     */
    @TableField("description")
    private String description;

    /**
     * 备注
     */
    @TableField("note")
    private String note;

    /**
     * 存储数量
     */
    @TableField("total")
    private Integer total;

    /**
     * 缩写
     */
    @TableField("abbr")
    private String abbr;


    public static final String ID = "id";

    public static final String VALID = "valid";

    public static final String CREATE_TIME = "create_time";

    public static final String CREATOR_ID = "creator_id";

    public static final String UPDATER_ID = "updater_id";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    public static final String STATUS = "status";

    public static final String INTER_CODE = "inter_code";

    public static final String CODE = "code";

    public static final String FACTORY_ID = "factory_id";

    public static final String AREA_ID = "area_id";

    public static final String SHELF_NAME = "shelf_name";

    public static final String ROW_NUM = "row_num";

    public static final String COLUMN_NUM = "column_num";

    public static final String DESCRIPTION = "description";

    public static final String NOTE = "note";

    public static final String TOTAL = "total";

    public static final String ABBR = "abbr";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
